<?php

include_once '../common_mbs.inc.php';
include_once '../smarty.inc.php';

//判断访问权限
$admin_index_module_obj = new osgh_admin_index_module_cls();
$is_warrant = $admin_index_module_obj->is_have_warrant($_ADMIN_ID,'kefu_list');
if(!$is_warrant) tcmc_cls::ShowMsg("没有权限访问！", "../index_body.html");


$kefu_obj = new kefu_cls();
$kefu_qq = isset($_REQUEST['kefu_qq']) ? trim($_REQUEST['kefu_qq']) : '';
$where_str = "kefu_qq like '%{$kefu_qq}%'";
$count = $kefu_obj->get_kefu_list(true, $where_str);

$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;

$p = new show_page_cls;
$page_size = 30;
$p -> pvar="page";
$p -> setvar(array("kefu_name"=>$kefu_name));
$p -> set($page_size,$count,$page);
$page_str = $p -> output(true);
$limit = $p -> limit();

$kefu_list = $kefu_obj->get_kefu_list(false, $where_str, '', $limit);

$smarty ->assign('kefu_qq' , $kefu_qq);
$smarty ->assign('kefulist', $kefu_list);
$smarty ->assign('page_str' , $page_str);

$smarty ->display('expand/kefu_list.tpl');

?>
